<?php

class UrusanController extends Controller
{
	public function actionUrusan()
	{
		$this->render('urusan');
	}

	public function actionInsert()
	{
		$this->render('urusan_insert');
	}

	public function actionSimpan(){
		$model= new MsUrusan;		

		$kode = $_POST['kd_urusan'];
		$nama = $_POST['nm_urusan'];			
		if($kode!=''){
			$model->simpan($kode,$nama);
		}
		$this->render('urusan');		
		
	}

	public function actionDelete(){
		$model= new MsUrusan;		
		$id = $_GET['id'];

		if($id!=''){
			$model->hapus($id);
		}
		$this->render('urusan');		
		
	}

}